import request from '@/axios'
import http from "@/utils/http";
import {UploadFileForm} from "@/api/common/types";

// 获取所有字典
export const getDictApi = () => {
  return request.get({ url: '/mock/dict/list' })
}

// 模拟获取某个字典
export const getDictOneApi = async () => {
  return request.get({ url: '/mock/dict/one' })
}

export const uploadApi = async(params: UploadFileForm)=>{
  const res = await http.file<string[]>('/v1/common/upload', params)
  return res.data
}